<template>
  <div class="demo">
    <div class="my-li" v-for="item in list" :key="item.name">
      {{ item.name }}1112
    </div>
  </div>
</template>

<script>
import tool from '@/utils/tool'
import entryStore from '@/store/entry_store'
export default {
  // asyncDataCache: true, //允许配置页面缓存；若页面渲染依赖于router.query，则不能配置缓存；若依赖于router.params、route.meta，可以配置缓存
  asyncData(store, router, context) {
    // tool.injectTag('range_js', context)
    // 服务端才调用
    entryStore.loadModule(store, ['ceshi'])
    return Promise.all([
      // store.dispatch('fetchNavs'),
      store.dispatch('ceshi/GET_LIST', {})
    ])
  },
  name: 'home',
  components: {
    
  },
  data() {
    return {}
  },
  computed: {
    list() {
      return this.$store.state.ceshi.list || []
    }
  },
  beforeMount() {
    // 初始化this.storage
    this.storage.init()
    entryStore.loadModule(this.$store, ['ceshi'])

    // this.$store.dispatch('ceshi/GET_LIST', {})
  },
  mounted() {
  },
  methods: {}
}
</script>

<style scoped></style>
